package com.pucong.gitee.database.backup.business.unRelational.redis.service;

import com.pucong.gitee.database.backup.business.unRelational.redis.util.RedisNode;
import com.pucong.gitee.database.backup.common.entity.redis.KeyBean;
import com.pucong.gitee.database.backup.common.entity.redis.ZTreeBean;

import java.util.LinkedList;
import java.util.List;

public interface DataClusterService {
    List<RedisNode> nodeInfo(String id);

    ZTreeBean treeInit(String id);

    ZTreeBean likeInit(String id, String pattern);

    LinkedList<ZTreeBean> treeData(String id, String pid, String pattern);

    KeyBean keysData(String id, String key, String order);

    Boolean renameKey(String id, String oldKey, String newKey);

    Boolean recoveKey(String id, String fileId);

    Boolean backupKey(String id, String pattern);

    Boolean removeKey(String id);

    Boolean insertKey(String id, int type, String key, String val, long time, double score);

    Boolean updateVal(String id, String json);

    Boolean deleteVal(String id, int type, String key, String val);

    Boolean insertVal(String id, int type, String key, String val, double score);

    Boolean updateStr(String id, String key, String val);

    Boolean retimeKey(String id, String key, long time);

    Boolean deleteKey(String id, String id1, String key);
}
